from PyQt4.QtCore import *
from PyQt4.QtGui import *

import sys

app = QApplication(sys.argv)

class Widget(QWidget):
    def __init__(self, parent=None):
        pass

widget = Widget(None)
try:
    widget.show()
except RuntimeError, e:
    pass

